package us.luosl.lslt.lang;

import java.util.Map;

public interface Tuple {

    static <T1, T2> Tuple2<T1, T2> of(T1 _1, T2 _2){
        return new Tuple2<>(_1, _2);
    }

    static <T1, T2> Tuple2<T1, T2> of(Map.Entry<T1, T2> entry){
        return new Tuple2<>(entry.getKey(), entry.getValue());
    }

    static <T1, T2, T3> Tuple3<T1, T2, T3> of(T1 _1, T2 _2, T3 _3){
        return new Tuple3<>(_1, _2, _3);
    }

}
